﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ingresoContratos.aspx.cs" ValidateRequest="false" Inherits="WebContratos._Default" %>

<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register TagPrefix="cc1" Namespace="BunnyBear" Assembly="msgBox" %>

<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxClasses" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Modulo de Contratos</title>
    
    <link rel="stylesheet" type="text/css" media="all" href="css/calendario/themeBlue.css" title="Aqua"/>
	<link rel="alternate stylesheet" type="text/css" media="all" href="css/calendario/theme(1)Blue.css" title="Tiger"/>
	
	<script type="text/javascript" src="js/calendario/calendar.js"></script>
	<script type="text/javascript" src="js/calendario/calendar-en.js"></script>
	<script type="text/javascript" src="js/deluxe/dpopupwindow.js"></script>
	<script type="text/javascript" src="js/deluxe/deluxe-popup-window.js"></script>
	<script type="text/javascript" src="js/FormatValor.js"> </script>
	<script type="text/javascript">
		
		var oldLink = null;
		
		function setActiveStyleSheet(link, title) 
		{
		  var i, a, main;
		  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
			if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
			  a.disabled = true;
			  if(a.getAttribute("title") == title) a.disabled = false;
			}
		  }
		  if (oldLink) oldLink.style.fontWeight = 'normal';
		  oldLink = link;
		  link.style.fontWeight = 'bold';
		  return false;
	    }

		function selected(cal, date) {
			  cal.sel.value = date; // just update the date in the input field.
			  if (cal.dateClicked && (cal.sel.id == "sel1" || cal.sel.id == "sel3"))
				// if we add this call we close the calendar on single-click.
				// just to exemplify both cases, we are using this only for the 1st
				// and the 3rd field, while 2nd and 4th will still require double-click.
				cal.callCloseHandler();
		}

		function closeHandler(cal) {
			  cal.hide();                        // hide the calendar
			//  cal.destroy();
			  _dynarch_popupCalendar = null;
		}
            
        
        function showCalendarControl(id, idImage, format, showsTime, showsOtherMonths) 
        {
			  var el = dg.GetEditFormElement('dg1',id);
			  var idIma = dg.GetEditFormElement('dg1',idImage);

			  if (_dynarch_popupCalendar != null) {
				// we already have some calendar created
				_dynarch_popupCalendar.hide();                 // so we hide it first.
			  } else {
				// first-time call, create the calendar.
				var cal = new Calendar(1, null, selected, closeHandler);
				// uncomment the following line to hide the week numbers
				// cal.weekNumbers = false;
				if (typeof showsTime == "string") {
				  cal.showsTime = true;
				  cal.time24 = (showsTime == "24");
				}
				if (showsOtherMonths) {
				  cal.showsOtherMonths = true;
				}
				_dynarch_popupCalendar = cal;                  // remember it in the global var
				cal.setRange(1900, 2070);        // min/max year allowed.
				cal.create();
			  }
			  _dynarch_popupCalendar.setDateFormat(format);    // set the specified date format
			  
			 // alert(el);
			  
			  _dynarch_popupCalendar.parseDate(el.value);      // try to parse the text in field
			  _dynarch_popupCalendar.sel = el;                 // inform it what input field we use

			  // the reference element that we pass to showAtElement is the button that
			  // triggers the calendar.  In this example we align the calendar bottom-right
			  // to the button.
			  _dynarch_popupCalendar.showAtElement(idIma, "Br");//(el.nextSibling, "Br");        // show the calendar

			  return false;
		}
            
			function showCalendar(id, idImage, format, showsTime, showsOtherMonths) {
			  var el = document.getElementById(id);
			  var idIma = document.getElementById(idImage);

			  if (_dynarch_popupCalendar != null) {
				// we already have some calendar created
				_dynarch_popupCalendar.hide();                 // so we hide it first.
			  } else {
				// first-time call, create the calendar.
				var cal = new Calendar(1, null, selected, closeHandler);
				// uncomment the following line to hide the week numbers
				// cal.weekNumbers = false;
				if (typeof showsTime == "string") {
				  cal.showsTime = true;
				  cal.time24 = (showsTime == "24");
				}
				if (showsOtherMonths) {
				  cal.showsOtherMonths = true;
				}
				_dynarch_popupCalendar = cal;                  // remember it in the global var
				cal.setRange(1900, 2070);        // min/max year allowed.
				cal.create();
			  }
			  _dynarch_popupCalendar.setDateFormat(format);    // set the specified date format
			  
			 // alert(el);
			  
			  _dynarch_popupCalendar.parseDate(el.value);      // try to parse the text in field
			  _dynarch_popupCalendar.sel = el;                 // inform it what input field we use

			  // the reference element that we pass to showAtElement is the button that
			  // triggers the calendar.  In this example we align the calendar bottom-right
			  // to the button.
			  _dynarch_popupCalendar.showAtElement(idIma, "Br");//(el.nextSibling, "Br");        // show the calendar

			  return false;
			}

			var MINUTE = 60 * 1000;
			var HOUR = 60 * MINUTE;
			var DAY = 24 * HOUR;
			var WEEK = 7 * DAY;

			// If this handler returns true then the "date" given as
			// parameter will be disabled.  In this example we enable
			// only days within a range of 10 days from the current
			// date.
			// You can use the functions date.getFullYear() -- returns the year
			// as 4 digit number, date.getMonth() -- returns the month as 0..11,
			// and date.getDate() -- returns the date of the month as 1..31, to
			// make heavy calculations here.  However, beware that this function
			// should be very fast, as it is called for each day in a month when
			// the calendar is (re)constructed.
			function isDisabled(date) {
			  var today = new Date();
			  return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10;
			}

			function flatSelected(cal, date) {
			  var el = document.getElementById("preview");
			  el.innerHTML = date;
			}

			function showFlatCalendar() {
			  var parent = document.getElementById("display");

			  // construct a calendar giving only the "selected" handler.
			  var cal = new Calendar(0, null, flatSelected);



			  // hide week numbers
			  cal.weekNumbers = false;

			  // We want some dates to be disabled; see function isDisabled above
			  cal.setDisabledHandler(isDisabled);
			  cal.setDateFormat("%A, %B %e");

			  // this call must be the last as it might use data initialized above; if
			  // we specify a parent, as opposite to the "showCalendar" function above,
			  // then we create a flat calendar -- not popup.  Hidden, though, but...
			  cal.create(parent);

			  // ... we can show it here.
			  cal.show();
			}
	
	</script>
	
	
	<style type="text/css">
                
                    .style6{ 
                font-size:11px; font:Tahoma;
                }

                .cajaTexto
                {
                font-size:11px; font:Tahoma;
                border-left:#6699CC 1px solid; border-bottom:#4167B0 1px solid;
                border-right:#6699CC 1px solid; border-top:#4167B0 1px solid;  
                }
                
                .cajaTextoInactivo
                {
                font-size:11px; font:Tahoma;
                border-left:#C5C5C5 1px solid; border-bottom:#C5C5C5 1px solid;
                border-right:#C5C5C5 1px solid; border-top:#C5C5C5 1px solid; background:#EAF3FF; 
                }
                
                .cajaTextoActivo
                {
                font-size:11px; font:Tahoma;
                border-left:#FFB74C 1px solid; border-bottom:#FFB74C 1px solid;
                border-right:#FFB74C 1px solid; border-top:#FFB74C 1px solid;  
                }

                #Dgradiente {

	                background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #CEDCF8),color-stop(1, #E5EEFC));
	                }
       
	         .btnCrm
	         { width:84px; height:22px; 
	           border-left:#6699CC thin solid; border-bottom:#4167B0 thin solid;
	           border-right:#6699CC thin solid; border-top:#4167B0 thin solid; 
	               font-size: 11px;
                background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #D0E5F7),color-stop(1, #B9D5EF));
            }
        	 
	         #button:active { 
	        position:relative; 
	        top:1px /* or more */ 
	        } 
            
            .Estilo3 {color: #000000; font-size: 11px; }
        
        .style7
        {
        }
        .style8
        {
            width: 44px;
        }
        .style9
        {
            width: 28px;
        }
        .style10
        {
            width: 323px;
        }
        .style11
        {
            width: 159px;
        }
        
        </style>
        
        <script language="javascript">
               function seleccionaTipo()
               {
                    var radio = document.getElementsByName('rdbTipo');
                    var valorTipo = '';
                    
                    for (var i = 0; i < radio.length; i++)
                    {
                        if (radio[i].checked)
                        {
                            valorTipo = radio[i].value;
                         }
                    }
                    
                    if (valorTipo=='1')
                    {
                       consultaContra();
                    }else if (valorTipo=='2')
                    {
                       ingresoContra();
                    }                   
                    
               }
               
               function consultaContra()
               {
                    document.getElementById('consultaContrato').style.visibility="visible"; 
                    document.getElementById('consultaContrato').style.display="block"; 

                    document.getElementById('ingresoContrato').style.visibility="hidden"; 
                    document.getElementById('ingresoContrato').style.display = "none";
                    
                    document.forms[0].btnGrabar.disabled=true;
                    //document.getElementById('btnGrabar').style.display="none"; 
               }
               
               function ingresoContra()
               {
                    document.getElementById('consultaContrato').style.visibility="hidden"; 
                    document.getElementById('consultaContrato').style.display = "none";		   			   
                    document.getElementById('ingresoContrato').style.display="block";
                    document.getElementById('ingresoContrato').style.visibility="visible"; 
                    
                    document.forms[0].btnGrabar.disabled=false;
                    
               }
               
               
               function actualizarContrato()
                        {
                               ShowLoginWindow();
                        }
                        
               function activa()
               {
                                    obj=document.getElementById('ASPxPageControl1_dpTipoPlazo');
                                    var valorEstContra = '';
                                    var valorEstContraText = '';

                                         for(var i= 0; i<obj.length; i++)
                                         {
                                            valorEstContra = obj.options[i].value;
                                            valorEstContraText = obj.options[i].text;
                                            if (valorEstContra == document.getElementById('ASPxPageControl1_lblPlazoContraTxt').value)
                                            {
                                                //document.getElementById('lblPlazoContra').value = valorEstContraText;
                                                document.getElementById('ASPxPageControl1_dpTipoPlazo').value = valorEstContra;
                                            }
                                         }
                                         
                                    obj=document.getElementById('ASPxPageControl1_dpFechaIniciaCon');
                                    var valorEstContra = '';
                                    var valorEstContraText = '';

                                         for(var i= 0; i<obj.length; i++)
                                         {
                                            valorEstContra = obj.options[i].value;
                                            valorEstContraText = obj.options[i].text;
                                            if (valorEstContra == document.getElementById('ASPxPageControl1_ConlstFechaInicioTxt').value)
                                            {
                                                //document.getElementById('lblPlazoContra').value = valorEstContraText;
                                                document.getElementById('ASPxPageControl1_dpFechaIniciaCon').value = valorEstContra;
                                            }
                                         }
                                  
                                document.getElementById('btnActualizar').style.visibility = 'visible';
                                document.getElementById('btnActualizar').style.display = "block";		
                                
                                document.getElementById('ASPxPageControl1_dpFechaIniciaCon').style.visibility = 'visible';
                                document.getElementById('ASPxPageControl1_dpFechaIniciaCon').style.display = "block";		
                                
                                
                                
                                //document.getElementById('btnModificar').style.visibility = 'visible';
                                document.getElementById('btnModificar').style.display = "none";		
                                document.getElementById('ASPxPageControl1_dpTipoPlazo').style.display = "block";
                                document.getElementById('ASPxPageControl1_lblPlazoContra').style.display = "none";
                                 document.getElementById('ASPxPageControl1_ConlstFechaInicio').style.display = "none";
                                 
                                 
                                 document.getElementById('imgContra').style.display = "block";	
                                 document.getElementById('img1').style.display = "block";	
                                 document.getElementById('img2').style.display = "block";	
                                 document.getElementById('img3').style.display = "block";	
                                 
                                 
                                 document.getElementById('ASPxPageControl1_ContxtContra').removeAttribute('readOnly'); 
                                 document.getElementById('ASPxPageControl1_ContxtDescContra').removeAttribute('readOnly'); 
                                 document.getElementById('ASPxPageControl1_ContxtRepresentanteContra').removeAttribute('readOnly'); 
               }
               
               
               function ObtieneDatosFechas(valor)
                 {
                     var lista = valor.options[valor.selectedIndex].value;
                     
                    
                     seleccionaTipoPlazo(valor);
                     
                     var plazo = document.getElementById('ASPxPageControl1_txtPlazoContra').value;
                     var desdeIni = document.getElementById('ASPxPageControl1_lstFechaInicio').value;
                     
                     
                     
                     if (plazo == '')
                     {
                         alert('Ingrese el Plazo');
                         return false;
                     }             
                     var fechaARG = desdeIni+','+plazo+','+lista+','+txtFechaIni+','+txtFechaAnti+','+txtFechaSuscrip;
                     
                     document.getElementById('ASPxPageControl1_txtDatosFechas').value = fechaARG;
                     
                 }
 
                var lstInicia = '';
        var txtFechaIni = '';
        var txtFechaAnti = '';
        var txtFechaSuscrip = '';
		
		function seleccionaTipoPlazo(valor)
		{
		    lstInicia = document.getElementById('ASPxPageControl1_lstFechaInicio').value;
		    txtFechaIni = document.getElementById('ASPxPageControl1_txtInciFecha').value;
		    txtFechaAnti = document.getElementById('ASPxPageControl1_txtFechaAnticipo').value;
		    txtFechaSuscrip = document.getElementById('ASPxPageControl1_txtFechaSuscripcion').value;
		    
		    
		    obtieneFecha(txtFechaIni);		    
		    txtFechaIni = dia + "/" + mes + "/" + anio;
		    
		    obtieneFecha(txtFechaAnti);		    
		    txtFechaAnti = dia + "/" + mes + "/" + anio;
		    
		    obtieneFecha(txtFechaSuscrip);		    
		    txtFechaSuscrip = dia + "/" + mes + "/" + anio;
		    
		    //obtieneFechaCulmina(lstInicia,txtFechaIni,txtFechaAnti,txtFechaSuscrip);
		}
		
		var hdTipoConsultaJa = '';
		var datoCodContra = '0';
		
		function abrirPopup(c_campo1, c_campo2, valor)
		{
            
           
		  campo1 = document.getElementById(c_campo1).value;
		  campo2 = document.getElementById(c_campo2).value;
		 
		  nomCampo1 = c_campo1;		  
		  nomCampo2 = c_campo2;
		  
		  var longiBusc = 0;
		  var longiBusc1 = 0;
		  
		  hdTipoConsultaJa = '';
		  
		  if(valor==1)
		  {
		    var dato = document.getElementById(c_campo1).value;  
		    longiBusc = dato.length;

		    var dato1 = document.getElementById(c_campo2).value;  
		    longiBusc1 = dato1.length;

		    
		    if (longiBusc < 3)
		      if(longiBusc1<4)
		      {
		        alert('Ingrese 3 Digitos de la Cedula del Contratista o el Nombre del Contratista');
		        return false;
		      }
		        
		    obtieneListaValores(campo1, campo2, 'consultaContratista');
			
		  }else if(valor==3)
		  {
		    obtieneListaValores(campo1, campo2, 'consultaFiscalizador');
		    
		  }else if(valor==2)
		  {
		    obtieneListaValores(campo1, campo2, 'consultaAdministrador');
		    
		  }else if(valor==4)
		  {
		  obtieneListaValores(campo1, campo2, 'consultaGerencia');
			
		  }else if(valor==5)
		  {
		     hdTipoConsultaJa = document.getElementById('hdTipoConsulta').value;
		     
		     if(hdTipoConsultaJa==1)
		         datoCodContra = '1';  
		     else
		         datoCodContra = '2';  
		         
		     obtieneListaValores(campo1, campo2, 'consultaCodProceso');
		  }
		}
        
        var obj;
              function getXMLHTTPRequest() 
              {
                 var xRequest=null;
                if (window.XMLHttpRequest) {
                xRequest=new XMLHttpRequest();
                }else if (typeof ActiveXObject != "undefined"){
                  xRequest=new ActiveXObject("Microsoft.XMLHTTP");
                }
                  return xRequest;
                }
            function obtieneListaValores(campo1, campo2, campo3)
            {
                obj=getXMLHTTPRequest();
                if(obj!=null)
                {
                    obj.onreadystatechange = ProcessResponse;
                    obj.open("GET", "Srvlets/ProcessedPage.aspx?campo1="+campo1+"&campo2="+campo2+"&campo3="+campo3+"&campo4="+hdTipoConsultaJa,  true);
                    obj.send(null);         
                }
                return false;
            }

            function ProcessResponse()
            {
                var basePath = "";
                
                if(obj.readyState == 4)
                {
                    if(obj.status == 200)
                    {
                        var retval=obj.responseText;  
                        
                        window.open(basePath+'General/encontrarDatos.aspx?exP='+navigator.appName.indexOf("Microsoft")+'&nomCampo1='+nomCampo1+'&nomCampo2='+nomCampo2+'&conServ='+datoCodContra,'Consulta','width=590px,height=300px');

                    }
                    else
                    {
                        alert("Error retrieving data!" );
                    }   
                }
            }

        var dia = '';
        var mes = '';
        var anio = '';

		function obtieneFecha(fechaT)
		{
            var longitud = fechaT.length;
            var conta = 0;
            dia = '';
            mes = '';
            anio = '';
            
                 for(var a=0; a<longitud; a++)
		         {
			        letra = fechaT.substr(a,1);
        			
			        if((letra=='-')||(letra==' '))
			        {
			            conta = conta + 1;
			        }
			        else
			        {
			            if(conta==2)
			            {
			                dia = dia + letra;
			            }
			            else if (conta==1)
			            {
			                mes = mes + letra;
        			        
			            }else if (conta==0)
			            {
			                anio = anio + letra;
			            }
        			    
			        }
		         }
        	
        	if (conta > 4)	
        	{
		         if(dia.length<2)
		         {
		            dia = '0'+dia;
		         }
		         if(mes.length<2)
		         {
		            mes = '0'+mes;
		         }
		         if(anio.length<3)
		         {
		            anio = '20'+anio;
		         }
		     }   
		}
		
        function selecInicia(valor)
		{
		   if(valor>=3)
		   {
		      document.getElementById('ASPxPageControl1_'+'txttxtInciFecha02').style.display = 'block';
		   }else
		   {
		   	  document.getElementById('ASPxPageControl1_txttxtInciFecha02').style.display = 'none';
			  document.getElementById('ASPxPageControl1_txtInciFecha').value = '';
		   }
		}
		
		
		function GetResults(result)
            {
                alert('Cargando....');
                if(result!="")
                {
                    
                    if(result!="-1")
                    {
                        var array=result;//.split(",");
                        document.getElementById('ASPxPageControl1_fechaCulmiIMG').style.display = "none";
                        document.getElementById('ASPxPageControl1_txtFechaCulminacion').value = array;                   
                    }

                }
                else
                {
                    document.getElementById('ASPxPageControl1_fechaCulmiIMG').style.display = "block";
                //do something
                }
            }
            
            function openVentana(urlS,alto)
            {
              if((alto=='')||(alto==null))
                alto = '280';
                
                window.open(urlS+'&tipo=actualiza',"_blank","status=1,menubar=0,toolbar=no,resizable=1,scrollbars=0,toolbar=0,titlebar=1,location=0,top=0,left=0,width=470px,height="+alto+"px");
            }
            
            function openVentanaInserta(urlS,alto)
            {
              if((alto=='')||(alto==null))
                alto = '280';
                window.open(urlS+'&tipo=inserta',"_blank","status=1,menubar=0,toolbar=no,resizable=1,scrollbars=0,toolbar=0,titlebar=1,location=0,top=0,left=0,width=470px,height="+alto+"px");
            }
            
            function consuGarantia(codigoContrato)
            {
                    mygrid.clearAll(true);                   
                    mygrid.init();
                    mygrid.loadXML("consuXmlGaran.aspx?codigoContrato="+codigoContrato);
            }
            
            function consuActa(codContrato)
            {
                    mygridActa.clearAll(true);                   
                    mygridActa.init();
                    mygridActa.loadXML("consuXmlActa.aspx?codigoContrato="+codContrato);
            }
            
            function consuPagos(codContrato)
            {
                    mygridPagos.clearAll(true);                   
                    mygridPagos.init();
                    mygridPagos.loadXML("consuXmlPagos.aspx?codigoContrato="+codContrato);
            }
            
            function consuAdendum(codContrato)
            {
                    mygridAdendum.clearAll(true);                   
                    mygridAdendum.init();
                    mygridAdendum.loadXML("consuXmlAdendum.aspx?codigoContrato="+codContrato);
            }
            
            function consuProrroga(codContrato)
            {
                    mygridProrroga.clearAll(true);                   
                    mygridProrroga.init();
                    mygridProrroga.loadXML("consuXmlProrroga.aspx?codigoContrato="+codContrato);
            }
            
            function consuAvance(codContrato)
            {
                    mygridAvances.clearAll(true);                   
                    mygridAvances.init();
                    mygridAvances.loadXML("consuXmlAvances.aspx?codigoContrato="+codContrato);
            }
            
            function consuNovedad(codContrato)
            {
                    mygridNovedad.clearAll(true);                   
                    mygridNovedad.init();
                    mygridNovedad.loadXML("consuXmlNovedad.aspx?codigoContrato="+codContrato);
            }
            
            
        </script>
        
        <link rel="STYLESHEET" type="text/css" href="js/dhtmlGRID/codebase/dhtmlxgrid.css">
            <link rel="stylesheet" type="text/css" href="js/dhtmlGRID/codebase/skins/dhtmlxgrid_dhx_skyblue.css">
            <link rel="STYLESHEET" type="text/css" href="js/dhtmlGRID/codebase/dhtmlxcalendar.css">

            <script  src="js/dhtmlGRID/codebase/dhtmlxcommon.js"></script>
            <script  src="js/dhtmlGRID/codebase/dhtmlxgrid.js"></script>        
            <script  src="js/dhtmlGRID/codebase/dhtmlxgridcell.js"></script>    

            <script  src="js/dhtmlGRID/codebase/Calen/dhtmlxcalendar.js"></script>    
            <script  src="js/dhtmlGRID/codebase/excells/dhtmlxgrid_excell_dhxcalendar.js"></script>
            <script src="js/dhtmlGRID/codebase/ext/dhtmlxgrid_validation.js" type="text/javascript" charset="utf-8"></script>            <link rel="stylesheet" href="dhtmlx_validation.css" type="text/css" media="screen" title="no title" charset="utf-8">

            <script  src="js/dhtmlGRID/codebase/excells/dhtmlxgrid_excell_cntr.js"></script>
            <script  src="js/dhtmlGRID/codebase/ext/dhtmlxgrid_splt.js"></script>
            <script  src="js/dhtmlGRID/codebase/dhtmlxdataprocessor.js"></script>
            <script  src="js/dhtmlGRID/codebase/ext/dhtmlxgrid_nxml.js"></script>
            <script  src="js/dhtmlGRID/codebase/excells/dhtmlxgrid_excell_link.js"></script>
            
            
            <script type="text/javascript">
            // <![CDATA[
                function ShowLoginWindow() {
                    ClientPopupControl.Show();
                }
                function ShowCreateAccountWindow() {
                    pcCreateAccount.Show();
                    tbUsername.Focus();
                }
            // ]]> 
            
                function abrirUsuarioDeri(nombreUrl)
                {
                    window.open(nombreUrl,'windowLDV','location=0,status=1,scrollbars=1,width=720,height=300');
                }
                
                function abrirUsuarioAdmin(nombreUrl)
                {
                    window.open(nombreUrl,'windowLDV','location=0,status=1,scrollbars=1,width=750,height=450');
                }
                
                function abrirEmailAdmin(nombreUrl)
                {
                    window.open(nombreUrl,'windowLDV','location=0,status=1,scrollbars=1,width=370,height=180');
                }
                
                
            </script>


</head>
<body >
     <form id="frmIngrContrato" runat="server" style="margin-bottom:0px; margin-left:0px; margin-right:0px; margin-top:0px">	
    
    <div>
        
            <table style="width:100%" cellSpacing="0" cols="0" cellPadding="0">
			    <tr>				
				 <td align="left" valign="bottom" style="width:80%">
					   <span style="height: 35px; font-weight: bold; font-size: 18px; color: #3A5389; font-family: Tahoma;"> 
                           <asp:Label ID="lblTituloPantalla" runat="server" Text="Ingreso de Contratos"></asp:Label> </span>
				 </td>				 
				 </tr>
            </table>
            <table bgcolor="#EAF3FF"  
                       style=" width: 100%; height:100%; 
                        	  font-size: 11px; font-family: Tahoma; border-right: #b0c2d0 1px solid;
            				  border-top: #b0c2d0 1px solid; border-left: #b0c2d0 1px solid; ">

				  <tr valign="top" style="width:100%; height:100%">
				    <td>
				    
				        <dx:ASPxPageControl ID="ASPxPageControl1" runat="server" ActiveTabIndex="0" 
                            Width="100%">
                            <TabPages>
                                <dx:TabPage Name="Contrato" Text="Contrato">
                                    <ContentCollection>
                                        <dx:ContentControl runat="server">
                                        
           <table bgcolor="#EAF3FF" cellpadding="0" cellspacing="0" style=" width: 100%;font-size: 11px; font-family: Tahoma;">
				<tr style="width:100%">				  
	                  <td class="style8"><b>Codigo de Proceso:</b></td>
					  <td class="style9">
                          <asp:TextBox ID="txtCodProceso" CssClass="cajaTexto" runat="server"></asp:TextBox>
                      </td>
                      <td  style="width:25px">
                          <asp:ImageButton ID="imgConCoPro" OnClientClick="abrirPopup('ASPxPageControl1_txtCodProceso','hdValorDesPro',5);return false;" runat="server" CausesValidation="False" 
                              ImageUrl="images/ico_18_126.gif" />
                              </td>
                       <td>
                               <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                       ControlToValidate="txtCodProceso" 
                                       ErrorMessage="Ingrese el Codigo Proceso">* Ingrese el No. Proceso</asp:RequiredFieldValidator>	
                      </td>
                      <td  style="width:100px">
                          <strong><span class="style6">Contrato No.:</span></strong>
                      </td>
	                    
					  <td style="width:25px">
					       <asp:TextBox ID="txtCodContrato" CssClass="cajaTexto" Width="132px" 
                               MaxLength="30" runat="server"></asp:TextBox>
					  </td>
					<td  style="width:25px">
					        <asp:ImageButton ID="imgConsulta" runat="server" Height="25px" 
                                       ImageUrl="images/public-fld.gif" onclick="ImageButton1_Click" Width="25px" 
                                       CausesValidation="False"  />
                    </td>		       
                    <td class="style11">
							       <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                       ControlToValidate="txtCodContrato" 
                                       ErrorMessage="Ingrese el No. Contrato">* Ingrese el No. Contrato</asp:RequiredFieldValidator>							   					
					  </td>
					  
					  <td class="style10">
					     <div align="left">
					     
                             <asp:RadioButtonList ID="rdbTipo" runat="server" RepeatDirection="Horizontal" 
                                 CssClass="cajaTexto" AutoPostBack="True" 
                                 onselectedindexchanged="rdbTipo_SelectedIndexChanged">
                                <asp:ListItem Value="1" Selected="True">Consulta</asp:ListItem>
                                 <asp:ListItem Value="2">Insertar</asp:ListItem>
                             </asp:RadioButtonList>
                             
                        </div>
					  </td>					  
					  <td class="style10">
                          &nbsp;</td>
					  <td style="width:20%">
                          <asp:Panel ID="pnlMensaje" runat="server" Visible="false">
                             <table id="mensajePos" cellSpacing=0 cols=0 cellPadding=0 style=" width:100%; height:26px; background-color:#FFFFAE; border-top: #C5C5C5 1px solid; border-bottom:#C5C5C5 1px solid; border-right:#C5C5C5 1px solid; border-left:#C5C5C5 1px solid;">
					    <tr>
			  		<td noWrap>
							<img src="images/importwizardinfo.gif">
					  </td>
					  <td style="width:1%">
					  </td>
							<td>
							<strong><span class="style6" id="spanMensaje">
                                <asp:Label ID="lblMensaje" runat="server" Text=""></asp:Label></span></strong>
							</td>
						</tr>
					</table>		
                          </asp:Panel>
                      </td>
					 </tr>				 
				  <tr style="width:100%">
					    <td style="border-bottom: #6699cc 1px solid;" class="style7" colspan="11">
						    &nbsp;</td>
					 </tr>
				  </table>
                  <asp:Panel ID="pnlConsulta" runat="server">                                 
				   <div id="consultaContrato" >
				      <table bgcolor="#EAF3FF"  style="width: 100%; height: auto; 							 
                        	  font-size: 11px; font-family: Tahoma; " cellpadding="0" cellspacing="0"> 
							  <tr style="height: 30px; width: 100%" >
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px; font:Tahoma; font-size:11px;"
									nowrap="nowrap">INCOP:</td>
							    <td>
                                    <asp:ImageButton ID="imgIncop" runat="server" Enabled="False" Height="33px" 
                                        ImageUrl="~/images/icoIncop.JPG" OnClick="imgIncop_Click" Width="79px">
                                    </asp:ImageButton>
                                    <asp:HiddenField ID="hdUrlIncop" runat="server">
                                    </asp:HiddenField>
                                  </td>
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Flujo de Informacion:</td>
							    <td style="width: 41%">
							        <asp:LinkButton ID="linConHisto" runat="server" OnClick="linConHisto_Click">Consulta Historica del Contrato</asp:LinkButton>
                                  </td>
					    </tr>
							  <tr style="height: 30px; width: 100%">
                                  <td nowrap="nowrap" 
                                      style="padding-right: 2px; padding-left: 5px; height: 30px; font:Tahoma; font-size:11px;">
                                      <span style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;">
                                      Fecha de Suscripcion: </span>
                                  </td>
                                  <td>
                                      <asp:TextBox ID="ContxtFechaSuscripcion" runat="server" CssClass="cajaTexto" 
                                          ReadOnly="True"></asp:TextBox>
                                      <span class="style6">YYYY-MM-DD</span>
                                  </td>
                                  <td nowrap="nowrap" 
                                      style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;">
                                      <span style="padding-right: 2px; padding-left: 5px; height: 30px;">Plazo: </span>
                                  </td>
                                  <td style="width: 41%">
                                      <table cellpadding="0" cellspacing="0">
                                          <tr>
                                              <td>
                                                  <asp:TextBox ID="txtPlazoCon" runat="server" CssClass="cajaTexto" Width="93px"></asp:TextBox>
                                              </td>
                                              <td>
                                                  <asp:TextBox ID="lblPlazoContra" runat="server" CssClass="cajaTexto"></asp:TextBox>
                                                  <asp:TextBox ID="lblPlazoContraTxt" runat="server"></asp:TextBox>
                                              </td>
                                              <td>
                                                  <asp:DropDownList ID="dpTipoPlazo" runat="server" CssClass="cajaTexto" 
                                                      DataSourceID="SqlDataSource7" DataTextField="CATALOGO_DESCRIPCION" 
                                                      DataValueField="CATALOGO_CODIGO" Width="136px">
                                                  </asp:DropDownList>
                                                  <asp:SqlDataSource ID="SqlDataSource7" runat="server" 
                                                      ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                                                      ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" 
                                                      SelectCommand="select catalogo_codigo, catalogo_descripcion from web_catalogo where catalogo_nombre = 'TIPPLAZO'">
                                                  </asp:SqlDataSource>
                                              </td>
                                          </tr>
                                      </table>
                                  </td>
                              </tr>
							  <tr style="height: 30px; width: 100%">
								<td nowrap="nowrap" 
                                      style="padding-right: 2px; padding-left: 5px; height: 30px; font:Tahoma; font-size:11px;">
								    <span style="padding-right: 2px; padding-left: 5px; height: 30px;">Inicia:</span></td>
								
								<td style="width: 50%;">
                                    <asp:TextBox ID="ConlstFechaInicio" runat="server" CssClass="cajaTexto" 
                                        ReadOnly="True"></asp:TextBox>
                                    <asp:TextBox ID="ConlstFechaInicioTxt" runat="server"></asp:TextBox>
                                    <asp:DropDownList ID="dpFechaIniciaCon" runat="server" CssClass="cajaTexto" 
                                        DataSourceID="SqlDataSource8" DataTextField="CATALOGO_DESCRIPCION" 
                                        DataValueField="CATALOGO_CODIGO" Width="166px">
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource8" runat="server" 
                                        ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                                        ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" 
                                        SelectCommand="select catalogo_codigo, catalogo_descripcion from web_catalogo where catalogo_nombre = 'SELFECHA'">
                                    </asp:SqlDataSource>
                                  </td> 
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Vigencia:</td> 
								<td style="width: 41%">
                                    <asp:TextBox ID="ContxtVigencia" runat="server" CssClass="cajaTexto" 
                                        ReadOnly="True"></asp:TextBox>
                                    <asp:TextBox ID="ContxtVigenciaTxt" runat="server" Visible="False"></asp:TextBox>
                                 </td> 
							  </tr> 							  
						      
							  <tr style="height: 30px; width: 100%">
								<td nowrap="nowrap" 
                                      style="padding-right: 2px; padding-left: 5px; height: 30px; font:Tahoma; font-size:11px;">
                                    Tipo de Contrato:
									 	
											  
											  							
							     </td> 
								 <td style="width: 50%;">
								    <table>
								        <tr>
                                            <td>
                                                <asp:TextBox ID="ConTipoContrato" runat="server" CssClass="cajaTexto" 
                                                    ReadOnly="True"></asp:TextBox>
                                            </td>
                                            <td>
                                                <input id="cEsContratista" name="cEsContratista" onclick="return false;" 
                                                    readonly="readonly" type="hidden" value="" />
                                            </td>
                                            <td>
                                                <asp:TextBox ID="ConTipoContratoTxt" runat="server" Visible="False"></asp:TextBox>
                                                <asp:CheckBox ID="ConchkTipoContra" runat="server" Enabled="False" 
                                                    Text="Contratista?" />
                                            </td>
                                        </tr>
                                </table>     
                                </td>
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Fondos:</td> 
											  <td style="width: 41%">
											      <asp:TextBox ID="ContxtFondos" runat="server" CssClass="cajaTexto" 
                                                      ReadOnly="True"></asp:TextBox>
                                                  <asp:TextBox ID="ContxtFondosTxt" runat="server" Visible="False"></asp:TextBox>
                                  </td>			
							  </tr> 
							  <tr style="height: 30px; width: 100%; display:none" >
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px; font:Tahoma; font-size:11px;"
									nowrap="nowrap">Clase:</td>
							    <td style="width:50%;">
							    <asp:TextBox ID="ContxtClase" ReadOnly="true" CssClass="cajaTexto" runat="server"></asp:TextBox>
							        <asp:TextBox ID="ContxtClaseText" runat="server" Visible="False"></asp:TextBox>
							    </td>
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">&nbsp;</td>
							    <td style="width: 41%">&nbsp;</td>
					    </tr>
							  <tr style="height: 30px; width: 100%" >
									
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap"> Contratista:								</td> 
								<td style="width:50%;">
								    <table cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                <asp:TextBox ID="ContxtContra" runat="server" CssClass="cajaTexto" 
                                                    MaxLength="14" Width="100px"></asp:TextBox>
                                            </td>
                                            <td>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="ContxtDescContra" runat="server" CssClass="cajaTexto" 
                                                    MaxLength="40" Width="250px"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:ImageButton ID="imgConContra" runat="server" CausesValidation="False" 
                                                    Enabled="False" ImageUrl="images/ico_18_126.gif" 
                                                    OnClientClick="abrirPopup('ASPxPageControl1_ContxtContra','ASPxPageControl1_ContxtDescContra',1);return false;" 
                                                    Width="16px">
                                                </asp:ImageButton>
                                            </td>
                                            
                                             <td>
                            <asp:ImageButton runat="server" CausesValidation="False" 
    OnClientClick="abrirPopup('ASPxPageControl1_txtContra','ASPxPageControl1_txtDescContra',1);return false;" 
    Width="16px" ID="ImageButton2" 
    ImageUrl="images/bar_bottom_ico_workplace.gif" Enabled="False"></asp:ImageButton>
                            </td>
                                        </tr>
                                    </table>
                                  </td> 
									
								<td style="font: Tahoma; padding-right: 2px; padding-left: 5px; height: 30px; font-size: 11px;" 
                                      nowrap="nowrap">
								
								    Representante Contratista:
								   
							 </td> 
								<td style="width: 41%;" width="41%">
                                    <asp:TextBox ID="ContxtRepresentanteContra" runat="server" CssClass="cajaTexto" 
                                        MaxLength="50" Width="370px"></asp:TextBox>
                                  </td> 
							  </tr> 
							  <tr style="height: 30px; width: 100%">
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Gerencia Solicitante:</td> 
								<td>
                                    <table cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                <asp:TextBox ID="ContxtGerencia" runat="server" CssClass="cajaTexto" 
                                                    MaxLength="14" Width="100px"></asp:TextBox>
                                            </td>
                                            <td>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="ContxtDescGerencia" runat="server" CssClass="cajaTexto" 
                                                    MaxLength="40" Width="250px"></asp:TextBox>
                                                <td>
                                                    <asp:ImageButton ID="imgConGeren" runat="server" CausesValidation="False" 
                                                        Enabled="False" ImageUrl="images/ico_18_126.gif" 
                                                        OnClientClick="abrirPopup('ASPxPageControl1_ContxtGerencia','ASPxPageControl1_ContxtDescGerencia',4);return false;" 
                                                        Width="16px">
                                                    </asp:ImageButton>
                                                </td>
                                            </td>
                                        </tr>
                                    </table>
                                  </td>
								
								  
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Administrador:								 </td> 
								<td style="width: 41%">
                                    <table cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                               <table>
                                                 <tr>
                                                   <td>
                                                <asp:ImageButton ID="imgAgregaAdministra" runat="server" 
                                                    ImageUrl="~/images/18_addview.gif" OnClick="imgAgregaAdministra_Click" 
                                                    CausesValidation="False" Enabled="False" />
                                                    </td>
                                                    <td>
                                                        <asp:ListBox ID="lstAdministradores" runat="server" CssClass="cajaTexto" Height="44px" 
                                                            Width="179px" DataTextField="ADMINISTRA" DataValueField="USER_USUARIO"></asp:ListBox>
                                                        <asp:SqlDataSource ID="SqlAdministrador" runat="server" 
                                                            ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                                                            ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" SelectCommand="select user_usuario, user_usuario || ' - ' || (select r.user_nombre|| ' '||r.user_apellido from web_usuarios r where r.user_usuario = t.user_usuario) administra
from t_adminicontrato t where estado = 'A'"></asp:SqlDataSource>
                                                     </td>
                                                  </tr>
                                                </table>
                                                <asp:TextBox ID="ContxtAdministrador" runat="server" CssClass="cajaTexto" 
                                                    MaxLength="14" Width="100px" Visible="False"></asp:TextBox>
                                            </td>
                                            <td>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="ContxtDescAdministrador" runat="server" CssClass="cajaTexto" 
                                                    MaxLength="40" Width="250px" Visible="False"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:ImageButton ID="imgAdministrador" runat="server" CausesValidation="False" 
                                                    Enabled="False" ImageUrl="images/ico_18_126.gif" 
                                                    OnClientClick="abrirPopup('ASPxPageControl1_ContxtAdministrador','ASPxPageControl1_ContxtDescAdministrador',2);return false;" 
                                                    Width="16px" Visible="False">
                                                </asp:ImageButton>
                                            </td>
                                            <td></td>
                                            <td>
                                                <asp:ImageButton ID="imgAdArAdm" runat="server" 
                                                    ImageUrl="~/images/importwizardinfo.gif" OnClick="imgAdArAdm_Click" 
                                                    Visible="False">
                                                </asp:ImageButton></td>
                                        </tr>
                                    </table>
                                  </td> 
							  </tr> 
							  <tr style="height: 30px; width: 100%">
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;"
									nowrap="nowrap">Fiscalizador:</td> 
								<td style="height: 30px"><table cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td>
                                        <table>
                                           <tr>
                                            <td>
                                        <asp:ImageButton ID="imgAgregaFisca" runat="server" CausesValidation="False" 
                                            Enabled="False" ImageUrl="~/images/18_addview.gif" 
                                            OnClick="imgAgregaFisca_Click" />
                                            </td>
                                            <td>
                                                        <asp:ListBox ID="lstFiscalizadores" runat="server" CssClass="cajaTexto" Height="44px" 
                                                            Width="179px" DataTextField="ADMINISTRA" DataValueField="USER_USUARIO"></asp:ListBox></td>
                                              </tr>
                                         </table>   
                                    <asp:TextBox ID="ContxtFiscalizador" MaxLength="14" Width="100px" 
                                            CssClass="cajaTexto" runat="server" Visible="False"></asp:TextBox>
                                        <asp:SqlDataSource ID="SqlFiscalizador" runat="server" 
                                            ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                                            ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" 
                                            SelectCommand="Select * from dual"></asp:SqlDataSource>
                                    </td>
                                    <td>&nbsp;</td>
                                    <td>
                                    <asp:TextBox ID="ContxtDesFiscalizador" MaxLength="40" Width="250px" 
                                            CssClass="cajaTexto" runat="server" Visible="False"></asp:TextBox>
                                    
                                    <td>
                                    
                                    								
				<asp:ImageButton runat="server" CausesValidation="False" Enabled="False" 
                                            OnClientClick="abrirPopup('ASPxPageControl1_ContxtFiscalizador','ASPxPageControl1_ContxtDesFiscalizador',2);return false;" 
                                            ImageUrl="images/ico_18_126.gif"  Width="16px" ID="imgConFisca" 
                                            Visible="False"></asp:ImageButton>

                                                                            </td>
                                  </tr>
                                </table></td> 
								
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;"
									nowrap="nowrap">
                                    <p>
                                        Certificacion de
                                    </p>
                                    <p>
                                        Disponibilidad Presupuestaria :
                                    </p>
                                  </td> 
								<td style="height: 30px; width: 41%;">
                                    <asp:TextBox ID="textarea" runat="server" CssClass="cajaTexto" MaxLength="100" 
                                        Width="200px"></asp:TextBox>
                                  </td> 
							  </tr> 
							  <tr style="height: 30px; width: 100%">
                                  <td nowrap="nowrap" 
                                      style="padding-right: 2px; padding-left: 5px; height: 30px;">
                                      Delegado Tecnico:</td>
                                  <td style="height: 30px">
                                    <table>
                                      <tr>
                                      <td>
                                      <asp:ImageButton ID="imgAgregaDelegTe" runat="server" CausesValidation="False" 
                                          Enabled="False" ImageUrl="~/images/18_addview.gif" 
                                          OnClick="imgAgregaDeleTec_Click" />
                                          <asp:SqlDataSource ID="SqlDelegado" runat="server" 
                                              ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                                              ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" 
                                              SelectCommand="select * from dual"></asp:SqlDataSource>
                                          </td>
                                           <td>
                                                        <asp:ListBox ID="lstDelegados" runat="server" CssClass="cajaTexto" Height="44px" 
                                                            Width="179px" DataTextField="ADMINISTRA" DataValueField="USER_USUARIO"></asp:ListBox></td>
                                              </tr>
                                          </table>
                                  </td>
                                  <td nowrap="nowrap" 
                                      style="padding-right: 2px; padding-left: 5px; height: 30px;">
                                      &nbsp;</td>
                                  <td style="height: 30px; width: 41%;">
                                      &nbsp;</td>
                              </tr>
							  <tr style="height: 30px; width: 100%">
								<td style="font: Tahoma; padding-right: 2px; padding-left: 5px; height: 30px; font-size: 11px;" 
                                      nowrap="nowrap">
                                    Objeto de Contrato:
                                  </td> 
								<td>
                                    <asp:TextBox ID="ContxtObjetoContrato" runat="server" Columns="10" 
                                        CssClass="cajaTexto" Rows="3" TextMode="MultiLine"></asp:TextBox>
                                  </td> 
								<td nowrap="nowrap" 
                                      style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;">
                                    <span style="padding-right: 2px;  height: 30px;font:Tahoma; font-size:11px;">
                                    Fecha de Anticipo: </span></td> 
								<td>
                                    <table cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                <asp:TextBox ID="ContxtFechaAnticipo" runat="server" CssClass="cajaTexto" 
                                                    ReadOnly="True" Width="132px"></asp:TextBox>
                                                <span class="style6">YYYY-MM-DD</span>
                                            </td>
                                        </tr>
                                    </table>
                                  </td> 
							  </tr> 
							  <tr style="height: 30px; width: 100%" >
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px;" nowrap="nowrap">
                                    Monto de Contrato:</td>
							    <td><span style="width: 41%">
                                    <asp:TextBox ID="ContxtMontoContrato" runat="server" CssClass="cajaTexto" 
                                        Width="132px"></asp:TextBox>
                                    </span></td>
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px; "
									nowrap="nowrap">Fecha de Culminacion: </td>
							    <td style="width:41%;">
							    
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:TextBox ID="ContxtFechaCulminacion" runat="server" CssClass="cajaTexto" 
                                                    MaxLength="20" Width="40px"></asp:TextBox>
                                                <span class="style6">YYYY-MM-DD</span>
                                            </td>
                                        </tr>
                                    </table>
							    </td>
					    </tr>
							  <tr style="height: 30px; width: 100%" >
							    <td style="font: Tahoma; padding-right: 2px; padding-left: 5px; height: 30px; font-size: 11px;" 
                                      nowrap="nowrap">
                                    % Anticipo
							    
							    </td>
							    <td>
                                    <asp:TextBox ID="ContxtPorcentajeAnti" runat="server" CssClass="cajaTexto" 
                                        MaxLength="3" Width="40px"></asp:TextBox>
                                  </td>
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Usuario que Continua Proceso: </td>
							    <td style="width:41%;">
                                    <asp:ImageButton ID="imgConsultaUsuario" runat="server" 
                                        CausesValidation="False" Enabled="False" ImageUrl="~/images/editar.jpg" 
                                        OnClick="imgConsultaUsuario_Click">
                                    </asp:ImageButton>
							      </td>
					    </tr>
						      
					 </table> 
				      
				  </div> 
				  </asp:Panel>
				  
				  <asp:Panel ID="pnlInsertar" runat="server" Visible="False">
				   <div id="ingresoContrato">
				   <table bgcolor="#EAF3FF"  style="width: 100%; height: auto;  							 
                        	  font-size: 11px; font-family: Tahoma; " cellpadding="0" cellspacing="0"> 
							  <tr style="height: 30px; width: 100%" >
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px; font:Tahoma; font-size:11px;"
									nowrap="nowrap">Fecha de Suscripcion:</td>
							    <td style="width:50%;"> 
                                    <asp:TextBox ID="txtFechaSuscripcion" CssClass="cajaTextoInactivo" Width="132px" 
                                        runat="server"></asp:TextBox>
                                    
                                   
							    <IMG style="cursor:pointer;"
            id="txtFechaSuscripcion02" border=0 alt="Calendario" width="16px" 
            src="images/calendar.png" onclick="return showCalendar(&#39;ASPxPageControl1_txtFechaSuscripcion&#39;,&#39;txtFechaSuscripcion02&#39;, &#39;%Y-%m-%d&#39;, &#39;24&#39;, true);">

                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                        ControlToValidate="txtFechaSuscripcion" 
                                        ErrorMessage="Ingrese la Fecha de Suscripcion">* Ingrese la Fecha de 
                                    Suscripcion</asp:RequiredFieldValidator>

                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                



                </td>
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Plazo:</td>
							    <td style="width: 41%">
							    <input type="hidden" id="txtDatosFechas" value="" />
							    <asp:TextBox ID="txtPlazoContra" CssClass="cajaTextoInactivo" Width="40px" 
                                        runat="server" ></asp:TextBox>
							    
							    
                                    <asp:DropDownList ID="tlstTipoPlazo" runat="server" CssClass="cajaTextoInactivo" 
                                        Width="250px"  DataSourceID="SqlDataSource1" 
                                        DataTextField="CATALOGO_DESCRIPCION" DataValueField="CATALOGO_CODIGO" 
                                        CausesValidation="True"                                         
                                        
                                        
                                        OnChange="ObtieneDatosFechas(tlstTipoPlazo);CallServer(txtDatosFechas.value)" Enabled="False"
                                        >
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                        ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                                        ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" 
                                        SelectCommand="SELECT CATALOGO_CODIGO, CATALOGO_DESCRIPCION FROM WEB_CATALOGO WHERE (CATALOGO_NOMBRE = 'TIPPLAZO') UNION SELECT '-1' AS CATALOGO_CODIGO, '' AS CATALOGO_DESCRIPCION FROM CTBCATEG.&quot;DUAL&quot; ORDER BY 2"></asp:SqlDataSource>
								   </td>
					    </tr>
						<tr style="height: 30px; width: 100%" >
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px; font:Tahoma; font-size:11px;"
									nowrap="nowrap">Inicia:</td>
							    <td style="width:50%;">
								<table cellpadding="0" cellspacing="0">
								<tr style="width:100%">
								<td>
								
								<asp:DropDownList ID="lstFechaInicio" runat="server" CssClass="cajaTextoInactivo" 
                                        Width="170px" DataSourceID="SqlDataSource2"  
                                        DataTextField="CATALOGO_DESCRIPCION" DataValueField="CATALOGO_CODIGO" 
                                        Enabled="False">
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                                        ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                                        ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" SelectCommand="select catalogo_codigo, catalogo_descripcion from web_catalogo where catalogo_nombre = 'SELFECHA'
order by 2"></asp:SqlDataSource>
								
								
								</td>
								<td>		
								
								<asp:TextBox ID="txtInciFecha" CssClass="cajaTextoInactivo" Width="82px" 
                                        runat="server" ></asp:TextBox>
</td>
																		   <td><IMG style="cursor:pointer;display:none"
            id="txttxtInciFecha02" border=0 alt="Calendario" width="16px" 
            src="images/calendar.png" onclick="return showCalendar(&#39;ASPxPageControl1_txtInciFecha&#39;,&#39;txttxtInciFecha02&#39;, &#39;%Y-%m-%d&#39;, &#39;24&#39;, true);">
                                    </td><td><span class="style6">YYYY-MM-DD</span></td>
			</tr>
			</table>
			
								</td>
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Vigencia</td>
							    <td style="width: 41%">
							    
							    <asp:DropDownList ID="LstestContrato" runat="server" CssClass="cajaTextoInactivo" 
                                        Width="170px" DataSourceID="SqlDataSource3"  
                                        DataTextField="CATALOGO_DESCRIPCION" DataValueField="CATALOGO_CODIGO">
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
                                        ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                                        ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" SelectCommand="select catalogo_codigo, catalogo_descripcion from web_catalogo where catalogo_nombre = 'ESTCONT'
order by 2"></asp:SqlDataSource>

							    </td>
					    </tr>
						 <tr style="height: 30px; width: 100%" >
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px; font:Tahoma; font-size:11px;"
									nowrap="nowrap">Tipo de Contrato:</td>
							    <td style="width:50%;">
							    
							    <asp:DropDownList ID="LstTipoContrato" runat="server" CssClass="cajaTextoInactivo" 
                                        Width="170px" DataSourceID="SqlDataSource4"  
                                        DataTextField="CATALOGO_DESCRIPCION" DataValueField="CATALOGO_CODIGO" 
                                        Enabled="False" Visible="False">
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
                                        ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                                        ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" SelectCommand="select catalogo_codigo, catalogo_descripcion from web_catalogo where catalogo_nombre = 'TIPCONTR'
order by 2"></asp:SqlDataSource>

							   
								 Contratista?
								 
                                    <asp:CheckBox ID="chkTipoContra" runat="server" Enabled="False" />
								 </td>
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Fondos:</td>
							    <td style="width: 41%">
							    
							    <asp:DropDownList ID="LstFondos" runat="server" CssClass="cajaTextoInactivo" 
                                        Width="170px"  DataSourceID="SqlDataSource5"  
                                        DataTextField="CATALOGO_DESCRIPCION" DataValueField="CATALOGO_CODIGO" 
                                        Enabled="False">
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
                                        ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                                        ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" SelectCommand="select catalogo_codigo, catalogo_descripcion from web_catalogo where catalogo_nombre = 'TIPFONDOS'
order by 2"></asp:SqlDataSource>

							    
                                
                                </td>
					    </tr>
						 <tr style="height: 30px; width: 100%; display:none" >
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px; font:Tahoma; font-size:11px;"
									nowrap="nowrap">Clase:</td>
							    <td style="width:50%;">
							    
							    <asp:DropDownList ID="LstClase" runat="server" CssClass="cajaTextoInactivo" 
                                        Width="170px"  DataSourceID="SqlDataSource6"  
                                        DataTextField="CATALOGO_DESCRIPCION" DataValueField="CATALOGO_CODIGO">
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource6" runat="server" 
                                        ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                                        ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" SelectCommand="select catalogo_codigo, catalogo_descripcion from web_catalogo where catalogo_nombre = 'CONTCLA'
order by 2"></asp:SqlDataSource>


							    </td>
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">&nbsp;</td>
							    <td style="width: 41%">&nbsp;</td>
					    </tr>
							  <tr style="height: 30px; width: 100%" >
								<td style="padding-right: 2px; padding-left: 5px; height: 30px; font:Tahoma; font-size:11px;"
									nowrap="nowrap">Contratista:								</td> 
								<td style="width:50%;">
								  <table cellpadding="0" cellspacing="0">
								    <tr>
									  <td>
									  
									  <asp:TextBox ID="txtContra" CssClass="cajaTextoInactivo" Width="100px" MaxLength="14" 
                                              runat="server" ></asp:TextBox>
									  
									</td>
									<td>&nbsp;</td>
									
			<td>
			<asp:TextBox ID="txtDescContra" CssClass="cajaTextoInactivo" Width="250px" MaxLength="150" 
                    runat="server" ></asp:TextBox>
		</td>
				<td>
				<asp:ImageButton runat="server" CausesValidation="False" 
    OnClientClick="abrirPopup('ASPxPageControl1_txtContra','ASPxPageControl1_txtDescContra',1);return false;" 
    Width="16px" ID="ImageButton4" 
    ImageUrl="images/ico_18_126.gif" Enabled="False"></asp:ImageButton>
				
                            </td>
                            
                           
			</tr>
			</table>				 </td> 
									
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap"> Representante Contratista:								</td> 
								<td width="41%" style="width: 41%">
								
								  <asp:TextBox ID="txtRepreContra" CssClass="cajaTextoInactivo" Width="370px" 
                                        MaxLength="50" runat="server" ></asp:TextBox>
							    </td> 
							  </tr>
							  <tr style="height: 30px; width: 100%" >
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px; font:Tahoma; font-size:11px;"
									nowrap="nowrap">Gerencia Solicitante:</td>
							    <td style="width:50%;"><table cellpadding="0" cellspacing="0">
								    <tr>
									  <td>
									  
									   <asp:TextBox ID="txtGerencia" CssClass="cajaTextoInactivo" Width="100px" MaxLength="14" 
                                              runat="server" ></asp:TextBox>
									   
							  		</td>
									<td>&nbsp;			</td>
			<td>
                <asp:TextBox ID="txtDesGerencia" Width="250px" CssClass="cajaTextoInactivo" 
                    MaxLength="40" runat="server"></asp:TextBox>
			
			</td>
				<td>
				<asp:ImageButton runat="server" CausesValidation="False" 
    OnClientClick="abrirPopup('ASPxPageControl1_txtGerencia','ASPxPageControl1_txtDesGerencia',4);return false;" 
     Width="16px" ID="ImageButton5" 
    ImageUrl="images/ico_18_126.gif" Enabled="False"></asp:ImageButton>
			                            </td>
			</tr>
			</table>								</td>
							    <td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Administrador:</td>
							    <td style="width: 41%"><table cellpadding="0" cellspacing="0">
								    <tr>
									  <td>
									  
									  <asp:TextBox ID="lstAdministrador" CssClass="cajaTextoInactivo" Width="100px" 
                                              MaxLength="14" runat="server" ></asp:TextBox>
									  								</td>
									<td>&nbsp;			
                                        
                                        </td>
			<td>
                <asp:TextBox ID="lstDesAdministrador" CssClass="cajaTextoInactivo" Width="200px" 
                    MaxLength= "40" runat="server"></asp:TextBox>
			
			</td>
				<td>
				
				<asp:ImageButton ID="imgDesAdministrador" Width="16px" 
                        OnClientClick="abrirPopup('ASPxPageControl1_lstAdministrador','ASPxPageControl1_lstDesAdministrador',2);return false;" 
                        runat="server" CausesValidation="False" ImageUrl="images/ico_18_126.gif" 
                        Enabled="False" />
			
                                        </td>
			</tr>
			</table>							</td>
					    </tr> 
						 <tr style="height: 30px; width: 100%">
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Fiscalizador:</td>
								<td> <table cellpadding="0" cellspacing="0">
								    <tr>
									  <td>
									  
									  <asp:TextBox ID="txtFiscalizador" CssClass="cajaTextoInactivo" Width="100px" MaxLength="14" 
                                              runat="server" ></asp:TextBox>
									  								</td>
									<td>&nbsp;			</td>
			<td>
                <asp:TextBox ID="txtDesFiscalizador" CssClass="cajaTextoInactivo" Width="250px" 
                    MaxLength="40" runat="server"></asp:TextBox>
			
			</td>
				<td>
								
				<asp:ImageButton runat="server" CausesValidation="False" 
    OnClientClick="abrirPopup('ASPxPageControl1_txtFiscalizador','ASPxPageControl1_txtDesFiscalizador',2);return false;" 
    Width="16px" ID="ImageButton1" 
    ImageUrl="images/ico_18_126.gif" Enabled="False"></asp:ImageButton>

                                        </td>
			</tr>
			</table>								   </td>
								
								  
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">&nbsp;</td> 
								
								<td style="width: 41%">&nbsp;</td> 
								
							  </tr> 
							  <tr style="height: 30px; width: 100%">
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Objeto de Contrato:								</td> 
								<td>
								 <asp:TextBox ID="txtObjetoContrato" CssClass="cajaTextoInactivo" TextMode="MultiLine" 
                                        Width="97%" Rows="3" MaxLength="14" runat="server" ></asp:TextBox>
								 
									 
											  </td> 
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap"><p>Certificacion de </p>
											   <p>Disponibilidad Presupuestaria : </p></td>
											  <td>
											  
											  <asp:TextBox ID="txtCerpresu" CssClass="cajaTextoInactivo" Width="200px" 
                                                       MaxLength="14" runat="server" ></asp:TextBox>
											  											 </td>
								<td> </td>					
							  </tr> 
							  <tr style="height: 30px; width: 100%">
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;"
									nowrap="nowrap">Monto de Contrato:</td> 
								<td>	
								
								
								<asp:TextBox ID="txtMontoContrato" CssClass="cajaTextoInactivo" Width="132px" 
                                        MaxLength="14" runat="server" ></asp:TextBox>
															 				    </td> 
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;"
									nowrap="nowrap">Fecha de Anticipo:</td> 
								<td style="width: 41%"><table cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td>
                                       <table cellpadding ="0" cellspacing="0" >
                                          <tr>
                                            <td>
                                        <asp:TextBox ID="txtFechaAnticipo" Enabled="false" CssClass="cajaTextoInactivo" Width="132px" 
                                                    runat="server"></asp:TextBox>
                                            </td>
                                          <td>
                                          
                                          				
				<asp:ImageButton runat="server" CausesValidation="False" OnClientClick="return showCalendar('ASPxPageControl1_txtFechaAnticipo', 'txtFechaAnticipo02','%Y-%m-%d', '24', true);" ImageUrl="images/calendar.png"  Width="16px" ID="ImageButton3" Visible="False"></asp:ImageButton>

                                        </td>
                                        <td>
                                    <span class="style6">YYYY-MM-DD</span> 
                                    </td>
                                    <td>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                        ControlToValidate="txtFechaAnticipo" 
                                        ErrorMessage="Ingrese una Fecha Correcta" 
                                        ValidationExpression="[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]">* Ingrese una 
                                        Fecha Correcta</asp:RegularExpressionValidator>
                                    
                                        </td>
                                        </tr>
                                     </table>
            </td>
                                  </tr>
                                </table>							   										</td> 
								
							  </tr> 
							  							<tr style="height: 30px; width: 100%">
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">% Anticipo: </td> 
								<td><span style="width: 41%">
								
								<asp:TextBox ID="txtPorcentajeAnti" CssClass="cajaTextoInactivo" Width="40px" MaxLength="3" 
                                        runat="server" ></asp:TextBox>
								
	
								</span></td>
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Fecha de Culminacion: </td> 								
								<td style="width: 41%"><table cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td>
                                    
                                    <asp:TextBox ID="txtFechaCulminacion" CssClass="cajaTextoInactivo" Width="132px" 
                                            MaxLength="20" runat="server" CausesValidation="True" ></asp:TextBox>
                                    </td>
                                    <td>
                                    
                                    <IMG style="cursor:pointer;display:none"
            id="fechaCulmiIMG" border=0 alt="Calendario" width="16px" 
            src="images/calendar.png" onclick="return showCalendar(&#39;ASPxPageControl1_txtFechaCulminacion&#39;,&#39;fechaCulmiIMG&#39;, &#39;%Y-%m-%d&#39;, &#39;24&#39;, true);">
                                    </td>
                                      <td> <span class="style6">YYYY-MM-DD</span> </td>
                                  </tr>
                                </table></td> 								
							  </tr>						 
							  							  <tr style="height: 30px; width: 100%;">
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Carga de Archivos:								
								</td>
								<td>
							   		
                                    <asp:FileUpload ID="txtCargaArchivos" runat="server" CssClass="cajaTexto" />
							   		
							    </td>
								<td style="padding-right: 2px; padding-left: 5px; height: 30px;font:Tahoma; font-size:11px;"
									nowrap="nowrap">Usuario que Continua Proceso:
								</td>
								<td style="width: 41%">
								
								<asp:FileUpload ID="txtCargaAnexo" runat="server" CssClass="cajaTexto" 
                                        Visible="False" />
								
								      
							        <asp:DropDownList ID="LstUsuarioContinua" runat="server" 
                                        CssClass="cajaTextoInactivo" DataSourceID="SqlDataSource9" 
                                        DataTextField="NOMBRE" DataValueField="USER_USUARIO" Enabled="False" 
                                         Width="170px" Visible="False">
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource9" runat="server" 
                                        ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                                        ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" 
                                        SelectCommand="SELECT USER_USUARIO, USER_NOMBRE || ' ' || USER_APELLIDO AS NOMBRE FROM WEB_USUARIOS WHERE (USER_DEPARTAMENTO IN (SELECT ID_DEPARTAMENTO FROM T_DEPARTAMENTOFLUJO WHERE (ID_FLUJO_ANT = 1) AND (ID_FLUJO_SIGUIENTE = 2)))">
                                    </asp:SqlDataSource>
                                    <asp:DropDownList ID="LstUsuarioContinuaF" runat="server" 
                                        CssClass="cajaTextoInactivo" DataSourceID="SqlDataSource10" 
                                        DataTextField="NOMBRE" DataValueField="USER_USUARIO" Enabled="False" 
                                        Visible="False" Width="170px">
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource10" runat="server" 
                                        ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                                        ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" SelectCommand="select w.user_usuario, (w.user_nombre||' '||w.user_apellido) nombre from t_usuflujo t, web_usuarios w
where t.user_usuario = w.user_usuario
and id_flujo = 2"></asp:SqlDataSource>
								
								      
							        <asp:ImageButton ID="imgConsultaUsuario0" runat="server" 
                                        CausesValidation="False" ImageUrl="~/images/editar.jpg" 
                                        OnClick="imgConsultaUsuario0_Click" />
								
								      
							 </td>
							  </tr>					 
							  
							  <tr>
							    <td colspan="12">
                                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
							    </td>
							  </tr>
						</table>
				   
				   </div>		  
				  </asp:Panel>
                                        </dx:ContentControl>
                                    </ContentCollection>
                                </dx:TabPage>
                                <dx:TabPage Name="Garantia" Text="Garantia">
                                    <ContentCollection>
                                        <dx:ContentControl runat="server">
                                         <table bgcolor="#EAF3FF"  style=" width: 100%; height:100%; font-size: 11px; font-family: Tahoma;">				
				  			<tr style="width: 100%; height:25px; font-weight: bold;">
	                  			<td style="border-bottom: #6699cc 1px solid;" class="style1" colspan="2" 
                                    height="19" >
	                       				<div align="left">
                                            DATOS DE LA GARANTIA</div>
								</td>	                    
					 		</tr>
							<tr style="height: auto; width: 100%; ">
                    			<td nowrap="nowrap" style="font: Tahoma; font-size: 11px; width: 18%;">
                                    <strong><span class="style6">Codigo del Contrato.</span></strong>&nbsp;</td>
                    			<td valign="top">
										<table cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td>
                                                    <table cellpadding="0" cellspacing="0" style="width:100%">
                                                        <tr>
                                                            <td>
                                                                <asp:TextBox ID="codContratoGar" runat="server" CssClass="cajaTexto" 
                                                                    MaxLength="30" ReadOnly="True"></asp:TextBox>
                                                            </td>
                                                            <td>
                                                                <span class="Estilo15"><b ID="B1" style="color:#FF0000; font-style:normal"></b>
                                                                </span>
                                                            </td>
                                                            <td>
                                                                <asp:Panel ID="pnlFilasGara" runat="server" Visible="False"><p><a 
                                                                        href="javascript:void(0)" 
                                                                        onclick="openVentanaInserta('consultaGarantia.aspx?codGaran=0');">Añadir Garantia</a></p></asp:Panel>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
								</td>
                  			</tr>
				  		</table>
				  		


					<div id="gridboxGara" style="width:auto;height:330px;background-color:white;overflow:hidden">					 		
					    
					</div>	
                                        </dx:ContentControl>
                                    </ContentCollection>
                                </dx:TabPage>
                                <dx:TabPage Name="actas" Text="Actas de Entrega">
                                    <ContentCollection>
                                        <dx:ContentControl runat="server">
                                         <table bgcolor="#EAF3FF"  style=" width: 100%; height:100%; font-size: 11px; font-family: Tahoma;">				
							<tr style="height: 25px; width: 100%; font-weight: bold;">
                    			<td height="19" colspan="13" class="style1" style="border-bottom: #6699cc 1px solid;">
										<div align="left">ACTAS DE ENTREGA</div>					
								</td>
                  			</tr>
				  			<tr style="width: 100%; height:auto">
					  			<td nowrap="nowrap" style="font: Tahoma; font-size: 11px; width: 18%;">
					    			<strong><span class="style6">Codigo del Contrato.</span></strong>&nbsp;</td>
	                  			<td valign="top" >
	                       				<table cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td>
                                                    <table cellpadding="0" cellspacing="0" style="width:100%">
                                                        <tr>
                                                            <td>
                                                                <asp:TextBox ID="txtCodEntrega" runat="server" CssClass="cajaTexto" 
                                                                    MaxLength="30" ReadOnly="True"></asp:TextBox>
                                                            </td>
                                                            <td>
                                                                <span class="Estilo15"><b ID="B2" style="color:#FF0000; font-style:normal"></b>
                                                                </span>
                                                            </td>
                                                            <td>
                                                                <asp:Panel ID="pnlActasEntrega" runat="server" Visible="False"><p><a 
                                                                        href="javascript:void(0)" 
                                                                        onclick="openVentanaInserta('consultaEntrega.aspx?codGaran=0');">Añadir Actas de Entrega</a></p></asp:Panel>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
								</td>	                    
					 		</tr>
				  		</table>
				  		


					<div id="divActEntre" style="width:auto;height:330px;background-color:white;overflow:hidden">					 		
					    
					</div>	
                                        </dx:ContentControl>
                                    </ContentCollection>
                                </dx:TabPage>
                                <dx:TabPage Name="pagos" Text="Pagos">
                                    <ContentCollection>
                                        <dx:ContentControl runat="server">
                                         <table bgcolor="#EAF3FF"  style=" width: 100%; height:100%; font-size: 11px; font-family: Tahoma;">				
							<tr style="height: 25px; width: 100%; font-weight: bold;">
                    			<td height="19" colspan="13" class="style1" style="border-bottom: #6699cc 1px solid;">
										<div align="left">DATOS DE LOS PAGOS</div>					
								</td>
                  			</tr>
				  			<tr style="width: 100%; height:auto">
					  			<td nowrap="nowrap" style="font: Tahoma; font-size: 11px; width: 18%;">
					    			<strong><span class="style6">Codigo del Contrato.</span></strong>&nbsp;</td>
	                  			<td valign="top" >
	                       				<table cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td>
                                                    <table cellpadding="0" cellspacing="0" style="width:100%">
                                                        <tr>
                                                            <td>
                                                                <asp:TextBox ID="txtCodPagos" runat="server" CssClass="cajaTexto" 
                                                                    MaxLength="30" ReadOnly="True"></asp:TextBox>
                                                            </td>
                                                            <td>
                                                                <span class="Estilo15"><b ID="B3" style="color:#FF0000; font-style:normal"></b>
                                                                </span>
                                                            </td>
                                                            <td>
                                                                <asp:Panel ID="pnlPagos" runat="server" Visible="False"><p><a 
                                                                        href="javascript:void(0)" 
                                                                        onclick="openVentanaInserta('consultaPagos.aspx?codPagos=0');">Añadir Pagos</a></p></asp:Panel>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
								</td>	                    
					 		</tr>
				  		</table>
				  		


					<div id="divPagosGrid" style="width:auto;height:330px;background-color:white;overflow:hidden">					 		
					    
					</div>				
                                        </dx:ContentControl>
                                    </ContentCollection>
                                </dx:TabPage>
                                <dx:TabPage Name="adendum" Text="Adendum">
                                    <ContentCollection>
                                        <dx:ContentControl runat="server">
                                         <table bgcolor="#EAF3FF"  style=" width: 100%; height:100%; font-size: 11px; font-family: Tahoma;">				
							<tr style="height: 25px; width: 100%; font-weight: bold;">
                    			<td height="19" colspan="13" class="style1" style="border-bottom: #6699cc 1px solid;">
										<div align="left">Adendum</div>					
								</td>
                  			</tr>
				  			<tr style="width: 100%; height:auto">
					  			<td nowrap="nowrap" style="font: Tahoma; font-size: 11px; width: 18%;">
					    			<strong><span class="style6">Codigo del Contrato.</span></strong>&nbsp;</td>
	                  			<td valign="top" >
	                       				<table cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td>
                                                    <table cellpadding="0" cellspacing="0" style="width:100%">
                                                        <tr>
                                                            <td>
                                                                <asp:TextBox ID="txtAdendum" runat="server" CssClass="cajaTexto" MaxLength="30" 
                                                                    ReadOnly="True"></asp:TextBox>
                                                            </td>
                                                            <td>
                                                                <span class="Estilo15"><b ID="B4" style="color:#FF0000; font-style:normal"></b>
                                                                </span>
                                                            </td>
                                                            <td>
                                                                <asp:Panel ID="pnlAdendum" runat="server" Visible="False"><p><a 
                                                                        href="javascript:void(0)" 
                                                                        onclick="openVentanaInserta('consultaAdendum.aspx?codGaran=0','400');">Añadir Adendum</a></p></asp:Panel>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
								</td>	                    
					 		</tr>
				  		</table>
				  		


					<div id="divAdendumGrid" style="width:auto;height:330px;background-color:white;overflow:hidden">					 		
					    
					</div>	
                                        </dx:ContentControl>
                                    </ContentCollection>
                                </dx:TabPage>
                                <dx:TabPage Name="prorroga" Text="Prorroga">
                                    <ContentCollection>
                                        <dx:ContentControl runat="server">
                                         <table bgcolor="#EAF3FF"  style=" width: 100%; height:100%; font-size: 11px; font-family: Tahoma;">				
							<tr style="height: 25px; width: 100%; font-weight: bold;">
                    			<td height="19" colspan="13" class="style1" style="border-bottom: #6699cc 1px solid;">
										<div align="left">Prorroga</div>					
								</td>
                  			</tr>
				  			<tr style="width: 100%; height:auto">
					  			<td nowrap="nowrap" style="font: Tahoma; font-size: 11px; width: 18%;">
					    			<strong><span class="style6">Codigo del Contrato.</span></strong>&nbsp;</td>
	                  			<td valign="top" >
	                       				<table cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td>
                                                    <table cellpadding="0" cellspacing="0" style="width:100%">
                                                        <tr>
                                                            <td>
                                                                <asp:TextBox ID="txtProContrato" runat="server" CssClass="cajaTexto" 
                                                                    MaxLength="30" ReadOnly="True"></asp:TextBox>
                                                            </td>
                                                            <td>
                                                                <span class="Estilo15"><b ID="B5" style="color:#FF0000; font-style:normal"></b>
                                                                </span>
                                                            </td>
                                                            <td>
                                                                <asp:Panel ID="pnlProrroga" runat="server" Visible="False"><p><a 
                                                                        href="javascript:void(0)" 
                                                                        onclick="openVentanaInserta('consultaProrroga.aspx?codProrroga=0');">Añadir Prorroga</a></p></asp:Panel>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
								</td>	                    
					 		</tr>
				  		</table>
				  		


					<div id="divProrrogaGrid" style="width:auto;height:330px;background-color:white;overflow:hidden">					 		
					    
					</div>
                                        </dx:ContentControl>
                                    </ContentCollection>
                                </dx:TabPage>
                                <dx:TabPage Name="avances" Text="Avances">
                                    <ContentCollection>
                                        <dx:ContentControl runat="server">
                                         <table bgcolor="#EAF3FF"  style=" width: 100%; height:100%; font-size: 11px; font-family: Tahoma;">				
							<tr style="height: 25px; width: 100%; font-weight: bold;">
                    			<td height="19" colspan="13" class="style1" style="border-bottom: #6699cc 1px solid;">
										<div align="left">Avances</div>					
								</td>
                  			</tr>
				  			<tr style="width: 100%; height:auto">
					  			<td nowrap="nowrap" style="font: Tahoma; font-size: 11px; width: 18%;">
					    			<strong><span class="style6">Codigo del Contrato.</span></strong>&nbsp;</td>
	                  			<td valign="top" >
	                       				<table cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td>
                                                    <table cellpadding="0" cellspacing="0" style="width:100%">
                                                        <tr>
                                                            <td>
                                                                <asp:TextBox ID="txtAvanceContrato" runat="server" CssClass="cajaTexto" 
                                                                    MaxLength="30" ReadOnly="True"></asp:TextBox>
                                                            </td>
                                                            <td>
                                                                <span class="Estilo15"><b ID="B6" style="color:#FF0000; font-style:normal"></b>
                                                                </span>
                                                            </td>
                                                            <td>
                                                                <asp:Panel ID="pnlAvance" runat="server" Visible="False"><p><a 
                                                                        href="javascript:void(0)" 
                                                                        onclick="openVentanaInserta('consultaAvances.aspx?codAvance=0');">Añadir Avance</a></p></asp:Panel>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
								</td>	                    
					 		</tr>
				  		</table>
				  		                 <div id="divAvanceGrid" style="width:auto;height:330px;background-color:white;overflow:hidden"></div>
				  		                 </dx:ContentControl>
				  		             </ContentCollection>
                                </dx:TabPage>
                                <dx:TabPage Name="novedades" Text="Novedades">
                                    <ContentCollection>
                                        <dx:ContentControl runat="server">
                                       
                                        	<table bgcolor="#EAF3FF"  style=" width: 100%; height:100%; font-size: 11px; font-family: Tahoma;">				
							<tr style="height: 25px; width: 100%; font-weight: bold;">
                    			<td height="19" colspan="13" class="style1" style="border-bottom: #6699cc 1px solid;">
										<div align="left">Novedades</div>					
								</td>
                  			</tr>
				  			<tr style="width: 100%; height:auto">
					  			<td nowrap="nowrap" style="font: Tahoma; font-size: 11px; width: 18%;">
					    			<strong><span class="style6">Codigo del Contrato.</span></strong>&nbsp;</td>
	                  			<td valign="top" >
	                       				<table cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td>
                                                    <table cellpadding="0" cellspacing="0" style="width:100%">
                                                        <tr>
                                                            <td>
                                                                <asp:TextBox ID="txtNovedadContr" runat="server" CssClass="cajaTexto" 
                                                                    MaxLength="30" ReadOnly="True"></asp:TextBox>
                                                            </td>
                                                            <td>
                                                                <span class="Estilo15"><b ID="B7" style="color:#FF0000; font-style:normal"></b>
                                                                </span>
                                                            </td>
                                                            <td>
                                                                <asp:Panel ID="pnlNovedad" runat="server" Visible="False"><p><a 
                                                                        href="javascript:void(0)" 
                                                                        onclick="openVentanaInserta('consultaNovedad.aspx?codNovedad=0');">Añadir Novedad</a></p></asp:Panel>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
								</td>	                    
					 		</tr>
				  		</table>
					                        <div id="divNovedadGrid" style="width:auto;height:330px;background-color:white;overflow:hidden">					 		
					                        </div>	
                                        </dx:ContentControl>
                                    </ContentCollection>
                                </dx:TabPage>
                            </TabPages>
                        </dx:ASPxPageControl>
                      </td>
			</tr>
		</table> 
		
		<div id="botonesContrato">
				     <table id="" bgcolor="#EAF3FF"
                       style="table-layout: fixed; width: 100%; height: auto; 							  
                        	  font-size: 11px; font-family: Tahoma; border-right: #b0c2d0 1px solid;
            				  border-left: #b0c2d0 1px solid; border-bottom: #b0c2d0 1px solid;" cellpadding="0" cellspacing="0">
							  
							 <tr style="height: 30px; width: 100%">
								<td height="36" colspan="4" nowrap="nowrap"
									style="padding-right: 2px; padding-left: 5px; text-align: center; height: 30px;">
								  <table>
									<tr>
									  <td>
                                          <asp:Button ID="btnModificar" runat="server" 
                                              OnClientClick="actualizarContrato();return false;" Text="Modificar" CausesValidation="False" 
                                              CssClass="btnCrm" UseSubmitBehavior="False" Visible="False" 
                                              onclick="btnModificar_Click" />									    
									  </td> 
									  
									  <td>
									     <input type="button" style="visibility:hidden; display:none"
											   class="btnCrm" value="Cancelar" name="btnCanModificar"
											   id="btnCanModificar" onClick="limpiaPantalla(3);"/> 
									  </td> 
									  
									  <td>
									  <asp:Button ID="btnActualizar" CssClass="btnCrm" runat="server" 
                                              Text="Actualizar"  CausesValidation="False" onclick="btnActualizar_Click"/>										
									  </td> 
									  <td>
										<input type="button"
										   class="btnCrm" value="Nuevo" name="btnNuevo" style="visibility:hidden; display:none"
										   id="btnNuevo" onClick="location.href='ingresoContratos.aspx'">
									  </td> 
									  <td>
									  
											   
                                          <asp:Button ID="btnGrabar" CssClass="btnCrm" runat="server" 
                                              Text="Grabar" onclick="btnGrabar_Click" Visible="False" />								
									  </td> 
									  <td>
			
										<asp:Button ID="btnGrabarMod" CssClass="btnCrm" runat="server" 
                                              Text="Grabar" Visible="False" onclick="btnGrabarMod_Click" />
                                                                      </td> <!-- Boton Derivar -->
									   <td>
										<input type="button" style="visibility:hidden; display:none"
											   class="btnCrm" value="Imprimir" name="btnImprimir"
											   id="btnImprimir" onClick="imprimirTramites();">                          </td> <!-- Boton Imprimir -->
									</tr>
								  </table>                    
								 </td>
							  </tr> 
							  
				     </table>
				  </div>
			
			<cc1:msgBox id="MsgBox1" style="Z-INDEX: 103; LEFT: 536px; POSITION: absolute; TOP: 184px" runat="server"></cc1:msgBox>
        
    <dx:ASPxPopupControl 
     ID="PopupControl" runat="server" CloseAction="CloseButton" LoadContentViaCallback="OnFirstShow"
                         PopupElementID="ShowButton" PopupVerticalAlign="WindowCenter" 
                PopupHorizontalAlign="WindowCenter" AllowDragging="True" PopupHorizontalOffset="40"
                         ShowFooter="True" Width="250px" Height="130px" 
                HeaderText="Ingrese el Usuario de Administrador" ClientInstanceName="ClientPopupControl" 
                Modal="True">
        <ContentCollection>
            <dx:PopupControlContentControl ID="PopupControlContentControl" runat="server">
            
               
                                      <table style="width:100%">
                                          <tr>
                                              <td>
                                                  <asp:Label ID="lblUsuario0" runat="server" 
                                                      style="font-weight: 700; font-size: xx-small" Text="Usuario:"></asp:Label>
                                              </td>
                                              <td>
                                                  <asp:TextBox ID="txtUsuario" runat="server"></asp:TextBox>
                                              </td>
                                          </tr>
                                          <tr>
                                              <td>
                                                  <asp:Label ID="lblContrase" runat="server" 
                                                      style="font-weight: 700; font-size: xx-small" Text="Contraseña:"></asp:Label>
                                              </td>
                                              <td>
                                                  <asp:TextBox ID="txtContra0" TextMode="Password" runat="server"></asp:TextBox>
                                              </td>
                                          </tr>
                                          <tr>
                                              <td colspan="2" style="text-align: center">
                                                  <dx:ASPxButton ID="ASPxButton1"  OnClick="ASPxButton1_Click" runat="server" AutoPostBack="true" Text="ACEPTAR">
                                                      <ClientSideEvents Click="function(s, e) {
	ClientPopupControl.Hide();
}" />
                                                  </dx:ASPxButton>
                                              </td>
                                          </tr>
                                      </table>
                  
                         
                
            </dx:PopupControlContentControl>
        </ContentCollection>
        <FooterTemplate>
            <div style="float: right; margin: 3px;">                
            </div>
        </FooterTemplate>
    </dx:ASPxPopupControl>

			
			<asp:Label ID="lblUsuario" runat="server" Visible="False"></asp:Label>
            <asp:Label ID="lblDepartamento" runat="server" Visible="False"></asp:Label>
        <asp:HiddenField ID="hdTipoConsulta" runat="server" />
    </div>
    
        
 
    
    <script language="javascript">
       function consultaAdministra()
       {
          var usuario = document.getElementById('txtUsuario').value;
          var contra = document.getElementById('txtContrase').value;
          
          
          if((usuario=='atipan')&&(contra=='atipan'))
          {
            alert('Usuario Correcto');
          }else
          {
            alert('Usuario Incorrecto');
          }
          
       }
    </script>
    <link rel="stylesheet" href="css/tabs/example.css" TYPE="text/css" MEDIA="screen">	
	<script type="text/javascript" src="js/tabs/tabber.js"></script>	
	
	<script type="text/javascript">


	   document.write('<style type="text/css">.tabber{display:none;}<\/style>');
	   
	   try
	   {
	   mygrid = new dhtmlXGridObject('gridboxGara');
							mygrid.setImagePath("js/dhtmlGRID/codebase/imgs/");
							mygrid.setColumnIds("A, Cedula,Nombres,Apellido,estadoCivil,fechaIngreso");
							mygrid.setHeader("Codigo Garantia,Tipo,Aseguradora,Fecha de Inicio,Plazo, Fecha de Fin, Monto, Estado");
							mygrid.setInitWidths("150,100,100,150,100,150,150,150,150")
							mygrid.setColAlign("right,right,left,left,left,left,left,left,left")
							mygrid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
							mygrid.setSkin("dhx_skyblue");
							mygrid.setColSorting("int,str,str,str,str,str,str,str,str,str")
							mygrid.init();
		}catch(e2)
				{
				  
				}		
		
		try{
		mygridActa = new dhtmlXGridObject('divActEntre');
							mygridActa.setImagePath("js/dhtmlGRID/codebase/imgs/");
							mygridActa.setColumnIds("A, Cedula,Nombres,Apellido,estadoCivil,fechaIngreso");
							mygridActa.setHeader("Codigo Acta,Fecha de Acta, Tipo de Acta,Liquidacion,Tecnico,Observacion");
							mygridActa.setInitWidths("150,100,100,150,100,150,150,150,150")
							mygridActa.setColAlign("right,right,left,left,left,left,left,left,left")
							mygridActa.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
							mygridActa.setSkin("dhx_skyblue");
							mygridActa.setColSorting("int,str,str,str,str,str,str,str,str,str")
							mygridActa.init();
		}catch(e2)
				{
				  
				}		

    try{							
        mygridPagos = new dhtmlXGridObject('divPagosGrid');
							mygridPagos.setImagePath("js/dhtmlGRID/codebase/imgs/");
							mygridPagos.setColumnIds("A, Cedula,Nombres,Apellido,estadoCivil,fechaIngreso");
							mygridPagos.setHeader("Secuencia de Pagos,Fecha de Entrega, Porcentaje,Informe de Anticipo,Forma de Pago,Poliza Asociada");
							mygridPagos.setInitWidths("150,100,100,150,100,150,150,150,150")
							mygridPagos.setColAlign("right,right,left,left,left,left,left,left,left")
							mygridPagos.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
							mygridPagos.setSkin("dhx_skyblue");
							mygridPagos.setColSorting("int,str,str,str,str,str,str,str,str,str")
							mygridPagos.init();

}catch(e2)
				{
				  
				}		
				
	try{							
         mygridAdendum = new dhtmlXGridObject('divAdendumGrid');
							mygridAdendum.setImagePath("js/dhtmlGRID/codebase/imgs/");
							mygridAdendum.setColumnIds("A, Cedula,Nombres,Apellido,estadoCivil,fechaIngreso");
							mygridAdendum.setHeader("Codigo de Adendum,Objeto del Adendum, Fecha de Suscripcion,Informe de Solicitante,Informe de Aprobante,Fecha de Extension");
							mygridAdendum.setInitWidths("150,100,100,150,100,150,150,150,150")
							mygridAdendum.setColAlign("right,right,left,left,left,left,left,left,left")
							mygridAdendum.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
							mygridAdendum.setSkin("dhx_skyblue");
							mygridAdendum.setColSorting("int,str,str,str,str,str,str,str,str,str")
							mygridAdendum.init();
}catch(e2)
				{
				  
				}																

  try{
         mygridProrroga = new dhtmlXGridObject('divProrrogaGrid');
							mygridProrroga.setImagePath("js/dhtmlGRID/codebase/imgs/");
							mygridProrroga.setColumnIds("A, Cedula,Nombres,Apellido,estadoCivil,fechaIngreso");
							mygridProrroga.setHeader("Codigo de Prorroga,Descripcion, Informe,Fecha Inicio,Fecha de Prorroga");
							mygridProrroga.setInitWidths("150,100,100,150,100,150,150,150,150")
							mygridProrroga.setColAlign("right,right,left,left,left,left,left,left,left")
							mygridProrroga.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
							mygridProrroga.setSkin("dhx_skyblue");
							mygridProrroga.setColSorting("int,str,str,str,str,str,str,str,str,str")
							mygridProrroga.init();
							}catch(e2)
				{
				  
				}		
				
    try
    {				
							
         mygridAvances = new dhtmlXGridObject('divAvanceGrid');
							mygridAvances.setImagePath("js/dhtmlGRID/codebase/imgs/");
							mygridAvances.setColumnIds("A, Cedula,Nombres,Apellido,estadoCivil,fechaIngreso");
							mygridAvances.setHeader("Secuencia de Avance,% Avance, %Total,Observacion,Fecha");
							mygridAvances.setInitWidths("150,100,100,150,100,150,150,150,150")
							mygridAvances.setColAlign("right,right,left,left,left,left,left,left,left")
							mygridAvances.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
							mygridAvances.setSkin("dhx_skyblue");
							mygridAvances.setColSorting("int,str,str,str,str,str,str,str,str,str")
							mygridAvances.init();																					
		}catch(e2)
				{
				  
				}		
				
try{				
		mygridNovedad = new dhtmlXGridObject('divNovedadGrid');
							mygridNovedad.setImagePath("js/dhtmlGRID/codebase/imgs/");
							mygridNovedad.setColumnIds("A, Cedula,Nombres,Apellido,estadoCivil,fechaIngreso");
							mygridNovedad.setHeader("Secuencia Novedad,Tipo de Novedad, Fecha de Novedad,Novedad");
							mygridNovedad.setInitWidths("150,100,100,150,100,150,150,150,150")
							mygridNovedad.setColAlign("right,right,left,left,left,left,left,left,left")
							mygridNovedad.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
							mygridNovedad.setSkin("dhx_skyblue");
							mygridNovedad.setColSorting("int,str,str,str,str,str,str,str,str,str")
							mygridNovedad.init();	
				}catch(e2)
				{
				  
				}			
				
         function cargaXmlGaran(rutaGaran)
         {
            try
            {
            mygrid.loadXML(rutaGaran);
            }catch(e1)
            {}
         }
         
         function cargaXmlActa(rutaActa)
         {
         try
            {
            mygridActa.loadXML(rutaActa);
            }catch(e1)
            {}
         }	
         
         function cargaXmlPagos(rutaActa)
         {
         try
            {
            mygridPagos.loadXML(rutaActa);
            }catch(e1)
            {}
         }
         
         function cargaXmlAdendum(rutaActa)
         {
         try
            {
            mygridAdendum.loadXML(rutaActa);
            }catch(e1)
            {}
         }
         
         function cargaXmlProrroga(rutaActa)
         {
         try
            {
            mygridProrroga.loadXML(rutaActa);
            }catch(e1)
            {}
         }
         
         function cargaXmlAvance(rutaActa)
         {
         try
            {
            mygridAvances.loadXML(rutaActa);
            }catch(e1)
            {}
         }
         
         function cargaXmlNovedad(rutaActa)
         {
         try
            {
            mygridNovedad.loadXML(rutaActa);
            }catch(e1)
            {}
         }
         						
	</script>
	
     
							       <asp:TextBox runat="server" ID="txtCodContr" 
    Visible="False" Width="16px"></asp:TextBox>

							       
					
     <asp:TextBox ID="ContTxtObservacion" runat="server" Visible="False"></asp:TextBox>
     <asp:TextBox ID="txtObservacion"
         runat="server" Visible="False"></asp:TextBox>
     <asp:HiddenField ID="hdValorDesPro" runat="server" />
         
     
    </form>
</body>
</html>
